Skip to content

fix(phone): match the Mac's provider tab rule, formatter rounding and Kimi metadata - #81

Merged
cte13 merged 1 commit into
mainfrom
fix/phone-parity
Oct 11, 2026
Merged

cte13 merged 1 commit into
mainfrom
fix/phone-parity

Conversation

@cte13

@cte13 cte13 commented Oct 11, 2026

Copy link
Copy Markdown
Owner

Summary

The upstream sync (#80) merged three Mac-side changes whose phone counterparts were left behind. This PR brings the shared package back in step with the Mac.

Defect log entry added: phone copies of Mac rules drift silently on upstream sync. Keep one rule in the shared package, and grep the phone, widget and shared package for copies when syncing.

Type of change

  • Bug fix
  • New feature
  • Refactor / cleanup
  • Documentation
  • Other:

Checklist

  • swift build and swift test pass locally
  • PR title follows Conventional Commits and title/description are written in English
  • UI changes include embedded images (before/after for existing screens; image of a new screen), or there is no visible UI change
  • No copyrighted assets, secrets, or private tooling references are committed (see CONTRIBUTING)
  • Tests were added or updated for this change

Validation

  • PokeTokenBarShared: swift test passes (65 tests). New tests: aRecountedProviderIdleTodayKeepsItsTabWhileThisMonthHasUsage, aRecountedProviderUsedInsideTheQuotaWindowSurvivesAMonthRollover (6 days back kept, 11 days back dropped), aMacOnlyProviderKeepsItsTabFromLastUsageAfterTheMacPeriodRolledOver, providerSnapshotWithoutLastUsageDecodes, and the Mac's formatter boundary cases. Reverting hasDisplayableUsage to the old rule makes the three retention tests fail.
  • Root package: swift test runs 1698 tests with one failure, SessionKeySettingsRenderingTests.testSessionKeyEntryOpensInsideViewportAndPreservesDifficultyControls, which fails identically on untouched main on this machine. Three test classes were skipped locally because they reach the real Keychain and stall on a system prompt here (KeychainAutoPathTests, IncrementalStoreScanTests, testKeychainDisabledRecordsNoHistory); CI has no Keychain entries and runs them.
  • No visible UI change: the phone shows the same screens with the Mac's tab retention and rounding.

🤖 Generated with Claude Code

https://claude.ai/code/session_01NUKUCMdezMcZX7Sb2Bwu6x

… Kimi metadata

The upstream sync (#80) merged three Mac-side changes whose phone copies
were left behind:

- Provider tabs (upstream chattymin#377, chattymin#402): the Mac now keeps a provider's tab
  while it has usage this week or month, a live block, or any use within the
  7-day quota window. The phone overlay still required usage today or a live
  block, so a provider used last Friday vanished from the phone on Monday
  while the Mac still showed it and its limits. The rule now lives once, in
  PhoneProviderSnapshot.hasDisplayableUsage(now:), and the payload carries
  lastUsage (optional; older Macs decode nil).
- TokenFormatter (upstream chattymin#365, chattymin#418): the shared copy the iPhone and widget
  use now promotes units at rounding boundaries and picks precision from the
  rounded value ("1M" not "1000.0K", "$100" not "$100.0", "80%" not "80.0%").
- ProviderMetadata: add kimi_code so the phone's provider list knows the new
  Kimi Code provider before the first payload arrives.

Defect log: phone copies of Mac rules drift on upstream sync; keep one rule
in the shared package and grep the phone, widget and shared package for
copies when syncing.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NUKUCMdezMcZX7Sb2Bwu6x
@cte13
cte13 merged commit e11107f into main Oct 11, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant